import Layout from '@/layout';

const userRouter = {
  path: '/user',
  component: Layout,
  redirect: '/user/list',
  name: 'User',
  meta: { title: '用户管理', icon: 'user' },
  children: [
    {
      path: 'list',
      name: 'UserList',
      component: () => import('@/views/user/list'),
      meta: { title: '用户列表', icon: 'list' }
    },
    {
      path: 'create',
      name: 'UserCreate',
      component: () => import('@/views/user/form'),
      meta: { title: '添加用户',icon:'add' }
    },
    {
      path: 'edit/:id',
      name: 'UserEdit',
      component: () => import('@/views/user/form'),
      meta: { title: '修改用户', noCache: true },
      hidden: true
    }
  ]
};

export default userRouter;
